﻿@model TodoApp.ViewModels.CreateTodoItemViewModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>Edit TodoItem</title>
</head>
<body>
    <div>
        @using (Html.BeginForm("Edit", "Home", FormMethod.Post, new { id = "Edit" }))
        {
            @Html.ValidationSummary(true)
            <fieldset>
                <legend>Create Todo Item</legend>
                <div>
                    <div>Name: </div>
                    <div>@Html.TextBoxFor(model => model.TodoItem.Name) </div>
                </div>
                <div>
                    <div>Priority: </div>
                    <div>@Html.TextBoxFor(model => model.TodoItem.Priority) </div>
                </div>
                <div>
                    <div>Complted: </div>
                    <div>@Html.CheckBoxFor(model => model.TodoItem.IsDone) </div>
                </div>
                <div>
                    @Html.HiddenFor(model => model.TodoItem.Id)
                    <input type="submit" value="Save" />
                    @Html.ActionLink("Delete", "Delete", new { id = Model.TodoItem.Id })
                </div>
            </fieldset>
        }
    </div>
</body>
</html>
